let hello = "   Hello, World!  ";
let wsRegex = /[^\s*|\s*$]/; // 修改这一行
let result = hello.replace(wsRegex, ""); // 修改这一行
console.log(result)